


public abstract class LendReserveItem extends LendItem implements Reserveable {
    private Customer _reservedBy;
    
    /**
     * Constructors
     * Calls the specific superclass constructor 
     */
    public LendReserveItem(String title) {
        super(title);
    }
    public LendReserveItem(String title, String description) {
        super(title, description);
    }
    
    /**
     * returnItem notify Observer that item is no available
     * @param c 
     */
    @Override
    public void returnItem(Customer c) {
        super.returnItem(c);
        //setChanged();
        //notifyObservers(this);
    }
    
    /**
     * Reserve a item for this customer
     * @param c customer
     */
    //@Override
    public void reserve(Customer c) {
        if (!isReserved()) {
            _reservedBy = c;
        } else {
            //TODO: Exception
           // throw new 
        }
    }

    /**
     * Check if item is reserved
     * @return true if reserved
     */
    //@Override
    public boolean isReserved() {
        return (_reservedBy != null);
    }

    /**
     * Returns the customer, who has reserved this item
     * @return customer object
     */
    //@Override
    public Customer reserverdBy() {
        if (isReserved()) {
            return _reservedBy;
        }
        return null;
    }

    /**
     * Delete the reservation
     */
    //@Override
    public void unreserve() {
        _reservedBy = null;
    }
    
}
